package com.zhuliwei.actuator;

import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author 朱力维
 * @time 2022/10/23 17:34
 **/
@Component
public class InfoConfig implements InfoContributor {
    @Override
    public void contribute(Info.Builder builder) {
        Map infoMap = new HashMap();
        infoMap.put("author","ZhuLiWei");
        infoMap.put("runTime",System.currentTimeMillis());
        infoMap.put("buildTime",2022);
        builder.withDetails(infoMap);
    }
}
